#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>

int main()
{
    pid_t ret = fork();
    if(ret == 0)
    {
        while(1)
        {
            //child process
            printf("this is child process, pid = %d, father process is %d, %d, %p\n", getpid(), getppid(), ret, &ret);
            sleep(1);
        }
    }
    else if(ret > 0)
    {
        while(1)
        {
            //father process    
            printf("this is father process, pid = %d, father process is %d, %d, %p\n", getpid(), getppid(), ret, &ret);
            sleep(1);
        
        }
    }
    else{}

    return 0;
}
